home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / Disks.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  2.0 KB  |  75 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Sunday, January 6, 1991 at 10:30 PM
  3.     Disks.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc.     1985-1989
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Disks;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingDisks}
  21. {$SETC UsingDisks := 1}
  22.  
  23. {$I+}
  24. {$SETC DisksIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingOSUtils}
  30. {$I $$Shell(PInterfaces)OSUtils.p}
  31. {$ENDC}
  32. {$SETC UsingIncludes := DisksIncludes}
  33.  
  34. TYPE
  35. DriveKind = (sony,hard20);
  36.  
  37.  
  38. DrvSts = RECORD
  39.     track: INTEGER;                 {current track}
  40.     writeProt: SignedByte;          {bit 7 = 1 if volume is locked}
  41.     diskInPlace: SignedByte;        {disk in drive}
  42.     installed: SignedByte;          {drive installed}
  43.     sides: SignedByte;              {-1 for 2-sided, 0 for 1-sided}
  44.     driveQLink: QElemPtr;           {next queue entry}
  45.     driveQVers: INTEGER;            {1 for HD20}
  46.     dQDrive: INTEGER;               {drive number}
  47.     dQRefNum: INTEGER;              {driver reference number}
  48.     dQFSID: INTEGER;                {file system ID}
  49.     CASE DriveKind OF
  50.       sony:
  51.         (twoSideFmt: SignedByte;    {after 1st rd/wrt: 0=1 side, -1=2 side}
  52.         needsFlush: SignedByte;     {-1 for MacPlus drive}
  53.         diskErrs: INTEGER);         {soft error count}
  54.       hard20:
  55.         (driveSize: INTEGER;        {drive block size low word}
  56.         driveS1: INTEGER;           {drive block size high word}
  57.         driveType: INTEGER;         {1 for HD20}
  58.         driveManf: INTEGER;         {1 for Apple Computer, Inc.}
  59.         driveChar: SignedByte;      {230 ($E6) for HD20}
  60.         driveMisc: SignedByte);     {0 -- reserved}
  61.     END;
  62.  
  63.  
  64. FUNCTION DiskEject(drvNum: INTEGER): OSErr;
  65. FUNCTION SetTagBuffer(buffPtr: Ptr): OSErr;
  66. FUNCTION DriveStatus(drvNum: INTEGER;VAR status: DrvSts): OSErr;
  67.  
  68.  
  69. {$ENDC}    { UsingDisks }
  70.  
  71. {$IFC NOT UsingIncludes}
  72.     END.
  73. {$ENDC}
  74.  
  75.